- 
                Notifications
    
You must be signed in to change notification settings  - Fork 439
 
fix(dialog): do not create file copy for save file picker on iOS #2548
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: v2
Are you sure you want to change the base?
Conversation
          
Package Changes Through 5056b29There are 2 changes which include updater with minor, updater-js with minor Planned Package VersionsThe following package releases are the planned based on the context of changes in this pull request. 
 Add another change file through the GitHub UI by following this link. Read about change files or the docs at github.com/jbolda/covector  | 
    
| 
           nice catch. I think we still need some improvements here, for instance now I couldn't access the file without https://developer.apple.com/documentation/foundation/nsurl/1417051-startaccessingsecurityscopedreso?language=objc I think we should add that to the FS plugin too  | 
    
| 
           Add two methods to fs   | 
    
c8ab743    to
    4de910e      
    Compare
  
    | 
           The open and save methods now return Path objects. These objects must be manually destroyed after use.  | 
    
On iOS the file picker returns a security scoped resource file path on the save() file picker: https://developer.apple.com/documentation/uikit/uidocumentpickerviewcontroller?language=objc#Work-with-external-documents this means we can't directly access it without calling [startAccessingSecurityScopedResource](https://developer.apple.com/documentation/foundation/nsurl/1417051-startaccessingsecurityscopedreso?language=objc) this PR changes the plugin to not access the save file early, leaving that to the user and returning its actual path # Conflicts: # examples/api/src-tauri/gen/apple/api.xcodeproj/project.pbxproj # plugins/dialog/ios/Sources/DialogPlugin.swift
On iOS the file picker returns a security scoped resource file path on the save() file picker: https://developer.apple.com/documentation/uikit/uidocumentpickerviewcontroller?language=objc#Work-with-external-documents
this means we can't directly access it without calling startAccessingSecurityScopedResource
this PR changes the plugin to not access the save file early, leaving that to the user and returning its actual path
fix #2089